<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: hiugiak
  Date: 2018-12-13
  Time: 15:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>毕业设计指导网站 - 群发消息</title>

    <jsp:include page="../../includes/framework-headers.jsp"/>
    <jsp:include page="../../includes/framework-navbar-teacher.jsp">
        <jsp:param name="navSelection" value="1-2"/>
    </jsp:include>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/components/form-advanced.almost-flat.min.css">

    <script src="${pageContext.request.contextPath}/js/teacher/group_message.js"></script>
</head>
<body>
<div class="gpg-middle">
    <div class="uk-container uk-container-center">
        <div class="uk-grid" data-uk-grid-margin>
            <jsp:include page="../../includes/framework-nav-panel-teacher.jsp">
                <jsp:param name="navSelection" value="1-2"/>
            </jsp:include>
            <div class="uk-width-medium-3-4">
                <article class="uk-article">
                    <div id="message_box" class="uk-panel-box uk-panel-box-secondary">
                        <form class="uk-form">
                            <table class="uk-table">
                                <tr>
                                    <td style="min-width: 50px"><label class="uk-text-small uk-text-bold" for="input_receiver" style="font-size: 14px">发给</label></td>
                                    <td style="width: 100%">
                                        <input type="text" id="input_receiver" style="width: 100%; font-size: 14px" disabled>
                                        <div class="uk-margin-small-top">
                                            <button type="button" class="uk-button uk-button-small" id="btn_add_receiver">添加学生</button>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="min-width: 50px"><label class="uk-text-small uk-text-bold" for="input_content" style="font-size: 14px">内容</label></td>
                                    <td style="width: 100%"><textarea rows="20" class="uk-width-1-1" id="input_content" style="resize: none;"></textarea></td>
                                </tr>
                            </table>
                        </form>
                        <div class="uk-panel">
                            <button class="uk-button uk-button-primary uk-align-right" id="btn_send_message"><i class="uk-icon-send"></i>  发送</button>
                        </div>
                        <div id="dialog_receiver_selection" class="uk-modal">
                            <div class="uk-modal-dialog">
                                <button type="button" class="uk-modal-close uk-close"></button>
                                <div class="uk-modal-header">
                                    <h2>选择接收消息的学生</h2>
                                </div>
                                <div class="uk-overflow-container">
                                    <form class="uk-form" id="form_receiver">
                                        <ul class="uk-list uk-list-line">
                                            <c:forEach var="student" items="${studentList}">
                                                <li>
                                                    <label>
                                                        <input type="checkbox" value="${student.userId}">
                                                        <span>${student.name}</span>
                                                    </label>
                                                </li>
                                            </c:forEach>
                                        </ul>
                                    </form>
                                </div>
                                <div class="uk-modal-footer uk-text-right">
                                    <button type="button" class="uk-button uk-modal-close">取消</button>
                                    <button type="button" class="uk-button uk-button-primary" id="btn_confirm">确认</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </article>
            </div>
        </div>
    </div>
</div>
</body>
</html>
